#ifndef MSB2023_OSCILLOSCOPE_OSCILLOSCOPE_H
#define MSB2023_OSCILLOSCOPE_OSCILLOSCOPE_H

#define OSC_SAMPLE_NUM 640 // 示波器一次DMA中断采样的点数

#include "main.h"
#include "key.h"

extern uint16_t show_points_num;
extern uint16_t show_value[OSC_SAMPLE_NUM]; // 显示数据

// 运行状态
typedef enum {
    OSC_RUN = 0,
    OSC_STOP
}RunState;

// 选中选项
typedef enum {
    OPT_RUN_STATE = 0,
    OPT_TRIG_MODE,
    OPT_VER,
    OPT_HOR,
    OPT_TRIG_LEVEL
}SelectOption;

// 触发模式
typedef enum {
    TM_AUTO,
    TM_NORMAL,
    TM_SINGLE
}TrigMode;

void osc_init();
void osc_process(int16_t num, KeyInfo info);
#endif //MSB2023_OSCILLOSCOPE_OSCILLOSCOPE_H
